package com.ubtechinc.cruzr.launcher2.model.entity;

import android.content.pm.ResolveInfo;
import android.provider.BaseColumns;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import com.tojc.ormlite.android.annotation.AdditionalAnnotation;
import com.ubtechinc.cruzr.launcher2.model.db.AppContract;

@AdditionalAnnotation.DefaultContentUri(authority = AppContract.AUTHORITY, path = AppContract.CONTENT_URI_PATH)
@AdditionalAnnotation.DefaultContentMimeTypeVnd(name = AppContract.MIMETYPE_NAME, type = AppContract.MIMETYPE_TYPE)
@DatabaseTable(tableName = AppContract.TABLE_NAME)
public class AppInfo {
    @DatabaseField(columnName = BaseColumns._ID, generatedId = true)
    public int id;
    @DatabaseField
    public String packagename;
    @DatabaseField
    public String activityname;
    public String appname;
    public String iconname;
    public ResolveInfo res;
    public boolean isclock = false;
    public boolean ispower = false;
    public boolean isSystemApp = false;
    public boolean isAdminiApp = false;
    public int thirdAppIndex = -1;

    public String getAppname() {
        return appname;
    }

    public void setAppname(String appname) {
        this.appname = appname;
    }

    public ResolveInfo getRes() {
        return res;
    }

    public void setRes(ResolveInfo res) {
        this.res = res;
    }

    public boolean isIsclock() {
        return isclock;
    }

    public void setIsclock(boolean isclock) {
        this.isclock = isclock;
    }

    public boolean isIspower() {
        return ispower;
    }

    public void setIspower(boolean ispower) {
        this.ispower = ispower;
    }

    public boolean isSystemApp() {
        return isSystemApp;
    }

    public void setSystemApp(boolean systemApp) {
        isSystemApp = systemApp;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
    public String getPackagename() {
        return packagename;
    }

    public void setPackagename(String packagename) {
        this.packagename = packagename;
    }

    public String getActivityname() {
        return activityname;
    }

    public void setActivityname(String activityname) {
        this.activityname = activityname;
    }

    public String getIconname() {
        return iconname;
    }

    public void setIconname(String iconname) {
        this.iconname = iconname;
    }

    @Override
    public String toString() {
        return "AppInfo{" +
                "id=" + id +
                ", packagename='" + packagename + '\'' +
                ", activityname='" + activityname + '\'' +
                ", iconname='" + iconname + '\'' +
                ", res=" + res +
                '}';
    }
}
